package com.lawliet.example.model.system;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("sys_notice")
@Schema(name = "SysNotice", description = "通知公告表")
public class SysNotice implements Serializable {

    @TableId(type = IdType.AUTO)
    @Schema(description = "公告ID")
    private Long id;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "内容")
    private String content;

    @Schema(description = "发布状态")
    private Integer publishStatus;

    @Schema(description = "接收人群")
    private String targetUserType;

    @Schema(description = "发布人")
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    @Schema(description = "发布时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
}
